package it.polito.connectedcar.vehicle;

import java.awt.geom.Point2D;

/**
 * This Delegate is used by higheer level objects to get informed when something
 * changed in lower level vehicle
 * 
 * @author Nicola Aresta
 * 
 */
public interface VehicleUpdateDelegate {

	/**
	 * Invoked when the source vehicle changed its speed
	 * 
	 * @param speed
	 *            expressed in (m/s)
	 */
	public void onSpeedChange(double speed);

	/**
	 * Since the vehicles are considered in local fields , the coordinates of
	 * their actual position are expressed in UTM format , which is the Marcator
	 * projection onto a plane
	 * 
	 * @param location
	 *            expressed in UTM coordinates
	 */
	public void onLocationChange(Point2D location);

	/**
	 * 
	 * @param angle
	 *            expressed in degree ( 0- 359 ) from magnetic north
	 */
	public void onDirectionChange(double angle);

	/**
	 * Invoked when the vehicle changes the lane it is moving into
	 * 
	 * @param laneId
	 */
	public void onLaneChange(String laneId);
}
